<div class="category">
   Category
  <div  >
    <%if !@category.blank?%>
      <%= link_to "All",{:action =>"index"} %>
      <%  @category.each do |cat|%>
        <%= link_to "#{cat.title}",{:action =>"index",:cat=>"#{cat.id}"} %>
      <%end%>
    <%end%>
  </div>
</div>
<div class="clear c60">&nbsp;</div>
<div class="ballot">
  <a class="subhead">Bad Day Story</a>
  <div class="scroll">
    <% if !@badday.nil? %>
      <% @badday.each_with_index do |bd,index| %>
        <p class="index"><%= index + 1 %></p>
        <p class="message"><%= bd.message %></p>
        <% if !bd.alias.nil? %>
          <p class="author">created at :<%= bd.created_at %> - by :<%=  bd.alias %></p>
          <p class="count">agree : <%= bd.agree %> | disagree : <%= bd.disagree %> </p>
        <%else%>
          <p class="author">created at :<%= bd.user.created_at %> - by :<%=  bd.user.login %></p>
          <p class="count">agree : <%= bd.agree %> | disagree : <%= bd.disagree %> </p>
        <%end%>
      <%end%>
    <%end%>
  </div>
  <%= will_paginate @badday, :page_param => params["badday_page"]  %>
</div>
<div class="clear c25">&nbsp;</div>